package com.atguigu.test.dacahngmainshitidierji;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @Author: 19shusheng.com
 * @Description:
 * @Date: Created in 23:43 2020/11/6
 * @Modified By:
 */
public class T1 {
    volatile int num = 0;

    public void getNum(){
        this.num = 10;
    }
    AtomicInteger atomicInteger = new AtomicInteger();
    public void addPlusPlus(){
        atomicInteger.incrementAndGet();
        this.num++;
    }
}
